// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/19/2014 5:30:12 PM				
// -----------------------------

#ifndef _IComputeShader_h
#define _IComputeShader_h

#include "IShader.h"

namespace DxLib
{

	class IRenderDevice;
	class IRenderTarget;
	class IRenderTarget2D;
	class IDepthStencil;
	class IBuffer;

	class DXLIB IComputeShader : public IShader
	{
	public:
		// Create the Interface
		static IComputeShader*	Create(IRenderDevice* lpDevice, void* lpByteCode, SizeT uByteCodeSize);
		// Release the Interface
		virtual void			Release() = 0;

		// Set a Buffer as a Constant Buffer
		virtual void			SetBufferAsConstant(UInt32 uSlot, IBuffer* lpBuffer) = 0;
		// Set a Buffer as a Shader Resource
		virtual void			SetBufferAsResource(UInt32 uSlot, IBuffer* lpBuffer) = 0;
		// Set a Buffer as an Unordered Access View
		virtual void			SetBufferAsUav(UInt32 uSlot, IBuffer* lpBuffer) = 0;
		// Set a Render Target as a Resource
		virtual void			SetTargetAsResource(UInt32 uSlot, IRenderTarget* lpTarget) = 0;
		// Set a Render Target 2D as a Resource
		virtual void			SetTarget2DAsResource(UInt32 uSlot, IRenderTarget2D* lpTarget) = 0;
		// Set a Render Target as a Unordered Access View
		virtual void			SetTargetAsUav(UInt32 uSlot, IRenderTarget* lpTarget) = 0;
		// Set a Depth Stencil as a Resource
		virtual void			SetStencilAsResource(UInt32 uSlot, IDepthStencil* lpStencil) = 0;

		// Clear a Resource
		virtual void			ClearResource(UInt32 uSlot) = 0;
		// Clear an Unordered Access View
		virtual void			ClearUav(UInt32 uSlot) = 0;
		// Clear a Constant Buffer
		virtual void			ClearConstant(UInt32 uSlot) = 0;

		// Get the Byte Code
		virtual const void*		GetByteCode() const = 0;
		// Get the Byte Code Size in Bytes
		virtual SizeT			GetByteCodeSize() const = 0;
	};

}

#endif